---
description: "Swift documentation for 'SIMDMask'"
title: "SIMDMask"
keywords: ""
layout: "default"
root: "/v5.1"
---

<div class="intro-declaration"><code class="language-swift">struct SIMDMask</code></div><table class="standard"><tr><th id="inheritance">Inheritance</th><td><code class="inherits">SIMD</code></td></tr><tr><th id="aliases">Associated Types</th><td><span id="aliasesmark"></span><div class="declaration"><code class="language-swift">public typealias MaskStorage = Storage</code><div class="comment"></div></div><div class="declaration"><code class="language-swift">public typealias Scalar = Bool</code><div class="comment"></div></div></td></tr></table><div class="discussion comment"></div><h3>Initializers</h3><div id="init-e67906ab4373125a18eb2b5a75f59bd2" class="declaration"><a class="toggle-link" href="#comment-init-e67906ab4373125a18eb2b5a75f59bd2">init init()</a> <span class="required">Required</span><div class="comment collapse in" id="comment-init-e67906ab4373125a18eb2b5a75f59bd2"><p>Creates a vector with zero in all lanes.</p>
<h4>Declaration</h4><code class="language-swift">public init()</code></div></div><div id="init-00a2b987552997ee43208aca83ac6ae6" class="declaration"><a class="toggle-link" href="#comment-init-00a2b987552997ee43208aca83ac6ae6">init init(_:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-init-00a2b987552997ee43208aca83ac6ae6"><p>Creates a vector from the given sequence.</p>
<blockquote>
<p>Precondition:
<code>scalars</code> must have the same number of elements as the vector type.</p>
</blockquote>
<ul>
<li>Parameter scalars: The elements to use in the vector.</li>
</ul>
<h4>Declaration</h4><code class="language-swift">@inlinable public init&lt;S>(_ scalars: S) where S: Sequence, Self.Scalar == S.Element</code></div></div><div id="init_arrayLiteral-122bf8141cc945de0f292024b4f08315" class="declaration"><a class="toggle-link" href="#comment-init_arrayLiteral-122bf8141cc945de0f292024b4f08315">init init(arrayLiteral:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-init_arrayLiteral-122bf8141cc945de0f292024b4f08315"><p>Creates a vector from the specified elements.</p>
<ul>
<li>Parameter scalars: The elements to use in the vector. <code>scalars</code> must
have the same number of elements as the vector type.</li>
</ul>
<h4>Declaration</h4><code class="language-swift">@inlinable public init(arrayLiteral scalars: Self.Scalar)</code></div></div><div id="init_from-ac2c581668ee6074e8eee083d88ea873" class="declaration"><a class="toggle-link" href="#comment-init_from-ac2c581668ee6074e8eee083d88ea873">init init(from:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-init_from-ac2c581668ee6074e8eee083d88ea873"><p>Creates a new vector by decoding scalars from the given decoder.</p>
<p>This initializer throws an error if reading from the decoder fails, or
if the data read is corrupted or otherwise invalid.</p>
<ul>
<li>Parameter decoder: The decoder to read data from.</li>
</ul>
<h4>Declaration</h4><code class="language-swift">public init(from decoder: Decoder) throws</code></div></div><div id="init_repeating-5e4e720f767ac20d10afec2514e82848" class="declaration"><a class="toggle-link" href="#comment-init_repeating-5e4e720f767ac20d10afec2514e82848">init init(repeating:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-init_repeating-5e4e720f767ac20d10afec2514e82848"><p>A vector with the specified value in all lanes.</p>
<h4>Declaration</h4><code class="language-swift">public init(repeating value: Self.Scalar)</code></div></div><h3>Instance Variables</h3><div id="description-67daf92c833c41c95db874e18fcb2786" class="declaration"><a class="toggle-link" href="#comment-description-67daf92c833c41c95db874e18fcb2786">var description</a> <span class="required">Required</span><div class="comment collapse in" id="comment-description-67daf92c833c41c95db874e18fcb2786"><p>A textual description of the vector.</p>
<h4>Declaration</h4><code class="language-swift">var description: String</code></div></div><div id="indices-a51a528f35c02157e603a20c8796a684" class="declaration"><a class="toggle-link" href="#comment-indices-a51a528f35c02157e603a20c8796a684">var indices</a> <span class="required">Required</span><div class="comment collapse in" id="comment-indices-a51a528f35c02157e603a20c8796a684"><p>The valid indices for subscripting the vector.</p>
<h4>Declaration</h4><code class="language-swift">var indices: Range&lt;Int></code></div></div><div id="scalarCount-2c88ac4714aa7276da0950dfc969879e" class="declaration"><a class="toggle-link" href="#comment-scalarCount-2c88ac4714aa7276da0950dfc969879e">var scalarCount</a> <span class="required">Required</span><div class="comment collapse in" id="comment-scalarCount-2c88ac4714aa7276da0950dfc969879e"><p>The number of scalars, or elements, in the vector.</p>
<h4>Declaration</h4><code class="language-swift">var scalarCount: Int</code></div></div><h3>Subscripts</h3><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Accesses the element at the specified index.</p>
<ul>
<li>Parameter index: The index of the element to access. <code>index</code> must be in
the range <code>0..&lt;scalarCount</code>.</li>
</ul>
<h4>Declaration</h4><code class="language-swift">public subscript(index: Int) -> Bool</code></div></div><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Extracts the scalars at specified indices to form a SIMD2.</p>
<p>The elements of the index vector are wrapped modulo the count of elements
in this vector. Because of this, the index is always in-range and no trap
can occur.</p>
<h4>Declaration</h4><code class="language-swift">public subscript&lt;Index>(index: SIMD2&lt;Index>) where Index: FixedWidthInteger, Index: SIMDScalar, Self.Scalar: SIMDScalar -> SIMD2&lt;Self.Scalar></code></div></div><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Extracts the scalars at specified indices to form a SIMD3.</p>
<p>The elements of the index vector are wrapped modulo the count of elements
in this vector. Because of this, the index is always in-range and no trap
can occur.</p>
<h4>Declaration</h4><code class="language-swift">public subscript&lt;Index>(index: SIMD3&lt;Index>) where Index: FixedWidthInteger, Index: SIMDScalar, Self.Scalar: SIMDScalar -> SIMD3&lt;Self.Scalar></code></div></div><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Extracts the scalars at specified indices to form a SIMD4.</p>
<p>The elements of the index vector are wrapped modulo the count of elements
in this vector. Because of this, the index is always in-range and no trap
can occur.</p>
<h4>Declaration</h4><code class="language-swift">public subscript&lt;Index>(index: SIMD4&lt;Index>) where Index: FixedWidthInteger, Index: SIMDScalar, Self.Scalar: SIMDScalar -> SIMD4&lt;Self.Scalar></code></div></div><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Extracts the scalars at specified indices to form a SIMD8.</p>
<p>The elements of the index vector are wrapped modulo the count of elements
in this vector. Because of this, the index is always in-range and no trap
can occur.</p>
<h4>Declaration</h4><code class="language-swift">public subscript&lt;Index>(index: SIMD8&lt;Index>) where Index: FixedWidthInteger, Index: SIMDScalar, Self.Scalar: SIMDScalar -> SIMD8&lt;Self.Scalar></code></div></div><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Extracts the scalars at specified indices to form a SIMD16.</p>
<p>The elements of the index vector are wrapped modulo the count of elements
in this vector. Because of this, the index is always in-range and no trap
can occur.</p>
<h4>Declaration</h4><code class="language-swift">public subscript&lt;Index>(index: SIMD16&lt;Index>) where Index: FixedWidthInteger, Index: SIMDScalar, Self.Scalar: SIMDScalar -> SIMD16&lt;Self.Scalar></code></div></div><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Extracts the scalars at specified indices to form a SIMD32.</p>
<p>The elements of the index vector are wrapped modulo the count of elements
in this vector. Because of this, the index is always in-range and no trap
can occur.</p>
<h4>Declaration</h4><code class="language-swift">public subscript&lt;Index>(index: SIMD32&lt;Index>) where Index: FixedWidthInteger, Index: SIMDScalar, Self.Scalar: SIMDScalar -> SIMD32&lt;Self.Scalar></code></div></div><div id="subscript_index-293ad0a56dee4ecca71b95ccc73897e9" class="declaration"><a class="toggle-link" href="#comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9">subscript subscript(index:)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-subscript_index-293ad0a56dee4ecca71b95ccc73897e9"><p>Extracts the scalars at specified indices to form a SIMD64.</p>
<p>The elements of the index vector are wrapped modulo the count of elements
in this vector. Because of this, the index is always in-range and no trap
can occur.</p>
<h4>Declaration</h4><code class="language-swift">public subscript&lt;Index>(index: SIMD64&lt;Index>) where Index: FixedWidthInteger, Index: SIMDScalar, Self.Scalar: SIMDScalar -> SIMD64&lt;Self.Scalar></code></div></div><h3>Instance Methods</h3><div id="encode_to-8c7f999a44e91e36e6d67e62075ffdbb" class="declaration"><a class="toggle-link" href="#comment-encode_to-8c7f999a44e91e36e6d67e62075ffdbb">func encode(to encoder: Encoder) throws</a> <span class="required">Required</span><div class="comment collapse in" id="comment-encode_to-8c7f999a44e91e36e6d67e62075ffdbb"><p>Encodes the scalars of this vector into the given encoder in an unkeyed
container.</p>
<p>This function throws an error if any values are invalid for the given
encoder's format.</p>
<ul>
<li>Parameter encoder: The encoder to write data to.</li>
</ul>
<h4>Declaration</h4><code class="language-swift">public func encode(to encoder: Encoder) throws</code></div></div><div id="hash_into-6d50cb3daa41162a12fb4542a687b393" class="declaration"><a class="toggle-link" href="#comment-hash_into-6d50cb3daa41162a12fb4542a687b393">func hash(into hasher: inout Hasher)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-hash_into-6d50cb3daa41162a12fb4542a687b393"><p>Hashes the elements of the vector using the given hasher.</p>
<h4>Declaration</h4><code class="language-swift">@inlinable public func hash(into hasher: inout Hasher)</code></div></div><div id="replace_with_where-93841bb2bc72fd94768523031e4c6835" class="declaration"><a class="toggle-link" href="#comment-replace_with_where-93841bb2bc72fd94768523031e4c6835">func replace(with other: Self, where mask: SIMDMask&lt;Self.MaskStorage>)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-replace_with_where-93841bb2bc72fd94768523031e4c6835"><p>Replaces elements of this vector with elements of <code>other</code> in the lanes
where <code>mask</code> is <code>true</code>.</p>
<h4>Declaration</h4><code class="language-swift">public mutating func replace(with other: Self, where mask: SIMDMask&lt;Self.MaskStorage>)</code></div></div><div id="replace_with_where-93841bb2bc72fd94768523031e4c6835" class="declaration"><a class="toggle-link" href="#comment-replace_with_where-93841bb2bc72fd94768523031e4c6835">func replace(with other: Self.Scalar, where mask: SIMDMask&lt;Self.MaskStorage>)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-replace_with_where-93841bb2bc72fd94768523031e4c6835"><p>Replaces elements of this vector with <code>other</code> in the lanes where <code>mask</code>
is <code>true</code>.</p>
<h4>Declaration</h4><code class="language-swift">public mutating func replace(with other: Self.Scalar, where mask: SIMDMask&lt;Self.MaskStorage>)</code></div></div><div id="replacing_with_where-dc4b2fcaa72a5e4572f0e8cd59238b6e" class="declaration"><a class="toggle-link" href="#comment-replacing_with_where-dc4b2fcaa72a5e4572f0e8cd59238b6e">func replacing(with other: Self, where mask: SIMDMask&lt;Self.MaskStorage>) -> Self</a> <span class="required">Required</span><div class="comment collapse in" id="comment-replacing_with_where-dc4b2fcaa72a5e4572f0e8cd59238b6e"><p>Returns a copy of this vector, with elements replaced by elements of
<code>other</code> in the lanes where <code>mask</code> is <code>true</code>.</p>
<h4>Declaration</h4><code class="language-swift">public func replacing(with other: Self, where mask: SIMDMask&lt;Self.MaskStorage>) -> Self</code></div></div><div id="replacing_with_where-dc4b2fcaa72a5e4572f0e8cd59238b6e" class="declaration"><a class="toggle-link" href="#comment-replacing_with_where-dc4b2fcaa72a5e4572f0e8cd59238b6e">func replacing(with other: Self.Scalar, where mask: SIMDMask&lt;Self.MaskStorage>) -> Self</a> <span class="required">Required</span><div class="comment collapse in" id="comment-replacing_with_where-dc4b2fcaa72a5e4572f0e8cd59238b6e"><p>Returns a copy of this vector, with elements <code>other</code> in the lanes where
<code>mask</code> is <code>true</code>.</p>
<h4>Declaration</h4><code class="language-swift">public func replacing(with other: Self.Scalar, where mask: SIMDMask&lt;Self.MaskStorage>) -> Self</code></div></div><h3>Type Methods</h3><div id="rhs-34b380ea184f26b8507d4db927c7871e" class="declaration"><a class="toggle-link" href="#comment-rhs-34b380ea184f26b8507d4db927c7871e">func .!(rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-rhs-34b380ea184f26b8507d4db927c7871e"><h4>Declaration</h4><code class="language-swift">prefix public static func .!(rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-6b971e58c53aca8889c4170bed357094" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-6b971e58c53aca8889c4170bed357094">func .!=(lhs: Self, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-6b971e58c53aca8889c4170bed357094"><p>Returns a vector mask with the result of a pointwise inequality
comparison.</p>
<h4>Declaration</h4><code class="language-swift">public static func .!=(lhs: Self, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></code></div></div><div id="lhs_rhs-6b971e58c53aca8889c4170bed357094" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-6b971e58c53aca8889c4170bed357094">func .!=(lhs: Self.Scalar, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-6b971e58c53aca8889c4170bed357094"><p>Returns a vector mask with the result of a pointwise inequality comparison.</p>
<h4>Declaration</h4><code class="language-swift">public static func .!=(lhs: Self.Scalar, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></code></div></div><div id="lhs_rhs-6b971e58c53aca8889c4170bed357094" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-6b971e58c53aca8889c4170bed357094">func .!=(lhs: Self, rhs: Self.Scalar) -> SIMDMask&lt;Self.MaskStorage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-6b971e58c53aca8889c4170bed357094"><p>Returns a vector mask with the result of a pointwise inequality comparison.</p>
<h4>Declaration</h4><code class="language-swift">public static func .!=(lhs: Self, rhs: Self.Scalar) -> SIMDMask&lt;Self.MaskStorage></code></div></div><div id="lhs_rhs-aa726805af436bd859bf06a7e3f93a7b" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-aa726805af436bd859bf06a7e3f93a7b">func .&amp;(lhs: SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-aa726805af436bd859bf06a7e3f93a7b"><h4>Declaration</h4><code class="language-swift">public static func .&amp;(lhs: SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-aa726805af436bd859bf06a7e3f93a7b" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-aa726805af436bd859bf06a7e3f93a7b">func .&amp;(lhs: Bool, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-aa726805af436bd859bf06a7e3f93a7b"><h4>Declaration</h4><code class="language-swift">public static func .&amp;(lhs: Bool, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-aa726805af436bd859bf06a7e3f93a7b" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-aa726805af436bd859bf06a7e3f93a7b">func .&amp;(lhs: SIMDMask&lt;Storage>, rhs: Bool) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-aa726805af436bd859bf06a7e3f93a7b"><h4>Declaration</h4><code class="language-swift">public static func .&amp;(lhs: SIMDMask&lt;Storage>, rhs: Bool) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-016c85715114f372be2348f2fcad9396" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-016c85715114f372be2348f2fcad9396">func .&amp;=(lhs: inout SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-016c85715114f372be2348f2fcad9396"><h4>Declaration</h4><code class="language-swift">public static func .&amp;=(lhs: inout SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>)</code></div></div><div id="lhs_rhs-016c85715114f372be2348f2fcad9396" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-016c85715114f372be2348f2fcad9396">func .&amp;=(lhs: inout SIMDMask&lt;Storage>, rhs: Bool)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-016c85715114f372be2348f2fcad9396"><h4>Declaration</h4><code class="language-swift">public static func .&amp;=(lhs: inout SIMDMask&lt;Storage>, rhs: Bool)</code></div></div><div id="lhs_rhs-1074002e56e077c1d6f35c671c2db9c8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-1074002e56e077c1d6f35c671c2db9c8">func .==(lhs: Self, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-1074002e56e077c1d6f35c671c2db9c8"><p>Returns a vector mask with the result of a pointwise equality comparison.</p>
<h4>Declaration</h4><code class="language-swift">public static func .==(lhs: Self, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></code></div></div><div id="lhs_rhs-1074002e56e077c1d6f35c671c2db9c8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-1074002e56e077c1d6f35c671c2db9c8">func .==(lhs: Self.Scalar, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-1074002e56e077c1d6f35c671c2db9c8"><p>Returns a vector mask with the result of a pointwise equality comparison.</p>
<h4>Declaration</h4><code class="language-swift">public static func .==(lhs: Self.Scalar, rhs: Self) -> SIMDMask&lt;Self.MaskStorage></code></div></div><div id="lhs_rhs-1074002e56e077c1d6f35c671c2db9c8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-1074002e56e077c1d6f35c671c2db9c8">func .==(lhs: Self, rhs: Self.Scalar) -> SIMDMask&lt;Self.MaskStorage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-1074002e56e077c1d6f35c671c2db9c8"><p>Returns a vector mask with the result of a pointwise equality comparison.</p>
<h4>Declaration</h4><code class="language-swift">public static func .==(lhs: Self, rhs: Self.Scalar) -> SIMDMask&lt;Self.MaskStorage></code></div></div><div id="lhs_rhs-44602659112d4bc69487bef5e870f8b8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-44602659112d4bc69487bef5e870f8b8">func .^(lhs: SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-44602659112d4bc69487bef5e870f8b8"><h4>Declaration</h4><code class="language-swift">public static func .^(lhs: SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-44602659112d4bc69487bef5e870f8b8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-44602659112d4bc69487bef5e870f8b8">func .^(lhs: Bool, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-44602659112d4bc69487bef5e870f8b8"><h4>Declaration</h4><code class="language-swift">public static func .^(lhs: Bool, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-44602659112d4bc69487bef5e870f8b8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-44602659112d4bc69487bef5e870f8b8">func .^(lhs: SIMDMask&lt;Storage>, rhs: Bool) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-44602659112d4bc69487bef5e870f8b8"><h4>Declaration</h4><code class="language-swift">public static func .^(lhs: SIMDMask&lt;Storage>, rhs: Bool) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-14274a7173b1f9c97d4b90b3841ae792" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-14274a7173b1f9c97d4b90b3841ae792">func .^=(lhs: inout SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-14274a7173b1f9c97d4b90b3841ae792"><h4>Declaration</h4><code class="language-swift">public static func .^=(lhs: inout SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>)</code></div></div><div id="lhs_rhs-14274a7173b1f9c97d4b90b3841ae792" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-14274a7173b1f9c97d4b90b3841ae792">func .^=(lhs: inout SIMDMask&lt;Storage>, rhs: Bool)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-14274a7173b1f9c97d4b90b3841ae792"><h4>Declaration</h4><code class="language-swift">public static func .^=(lhs: inout SIMDMask&lt;Storage>, rhs: Bool)</code></div></div><div id="lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883">func .|(lhs: SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883"><h4>Declaration</h4><code class="language-swift">public static func .|(lhs: SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883">func .|(lhs: Bool, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883"><h4>Declaration</h4><code class="language-swift">public static func .|(lhs: Bool, rhs: SIMDMask&lt;Storage>) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883">func .|(lhs: SIMDMask&lt;Storage>, rhs: Bool) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-4541d3b048a60c8ef4d4e3b961d47883"><h4>Declaration</h4><code class="language-swift">public static func .|(lhs: SIMDMask&lt;Storage>, rhs: Bool) -> SIMDMask&lt;Storage></code></div></div><div id="lhs_rhs-601ac2d1f23630162860b85bf35437d8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-601ac2d1f23630162860b85bf35437d8">func .|=(lhs: inout SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-601ac2d1f23630162860b85bf35437d8"><h4>Declaration</h4><code class="language-swift">public static func .|=(lhs: inout SIMDMask&lt;Storage>, rhs: SIMDMask&lt;Storage>)</code></div></div><div id="lhs_rhs-601ac2d1f23630162860b85bf35437d8" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-601ac2d1f23630162860b85bf35437d8">func .|=(lhs: inout SIMDMask&lt;Storage>, rhs: Bool)</a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-601ac2d1f23630162860b85bf35437d8"><h4>Declaration</h4><code class="language-swift">public static func .|=(lhs: inout SIMDMask&lt;Storage>, rhs: Bool)</code></div></div><div id="lhs_rhs-28a45cba8101c0b1017a22535b8b2710" class="declaration"><a class="toggle-link" href="#comment-lhs_rhs-28a45cba8101c0b1017a22535b8b2710">func ==(lhs: Self, rhs: Self) -> Bool</a> <span class="required">Required</span><div class="comment collapse in" id="comment-lhs_rhs-28a45cba8101c0b1017a22535b8b2710"><p>Returns a Boolean value indicating whether two vectors are equal.</p>
<h4>Declaration</h4><code class="language-swift">public static func ==(lhs: Self, rhs: Self) -> Bool</code></div></div><div id="random-d9eeb3e59bc4b2c7351e7f70dc78e868" class="declaration"><a class="toggle-link" href="#comment-random-d9eeb3e59bc4b2c7351e7f70dc78e868">func random() -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-random-d9eeb3e59bc4b2c7351e7f70dc78e868"><p>Returns a vector mask with <code>true</code> or <code>false</code> randomly assigned in each
lane.</p>
<h4>Declaration</h4><code class="language-swift">@inlinable public static func random() -> SIMDMask&lt;Storage></code></div></div><div id="random_using-ebedc35341d2c4c73061244b89a2c06b" class="declaration"><a class="toggle-link" href="#comment-random_using-ebedc35341d2c4c73061244b89a2c06b">func random(using generator: inout T) -> SIMDMask&lt;Storage></a> <span class="required">Required</span><div class="comment collapse in" id="comment-random_using-ebedc35341d2c4c73061244b89a2c06b"><p>Returns a vector mask with <code>true</code> or <code>false</code> randomly assigned in each
lane, using the given generator as a source for randomness.</p>
<h4>Declaration</h4><code class="language-swift">@inlinable public static func random&lt;T>(using generator: inout T) -> SIMDMask&lt;Storage> where T: RandomNumberGenerator</code></div></div>